package org.ResearchProject.controller;

import org.ResearchProject.dto.Result;
import org.ResearchProject.pojo.Tutor;
import org.ResearchProject.service.TutorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 导师信息查看
 */
@RestController
@RequestMapping("/tutor")
public class TutorController {
    @Autowired
    TutorService tutorService;
    /**
     * 查询所有导师
     */
    @RequestMapping(value = "/selectAll",method = RequestMethod.GET)
    public Result selectAll(){
        return Result.success(tutorService.selectAll());
    }

    /**
     * 条件查询导师
     */
    @RequestMapping(value = "/conditionSelect",method = RequestMethod.GET)
    public Result conditionSelect(@RequestBody Tutor tutor){
        return Result.success(tutorService.conditionSelect(tutor));
    }
}
